<?php

require_once APP_PATH.'/Controller/BaseController.php';
require_once APP_PATH.'/Model/CategoryModel.php';

class PhotoController extends BaseController {
	
	public function index(){
		
		$categoryModel = new CategoryModel();
		
		$this->assign('catelist',$categoryModel->getScrollData());
		$this->display('Photo/photo.html');
	}
	
	public function read(){
		$htmlpath = $_GET['htmlpath'];
		$articleModel = new ArticleModel();
		$categoryModel = new CategoryModel();
		
		$this->assign('catelist',$categoryModel->getScrollData());
		$this->assign('article',$articleModel->getArticle($htmlpath));
		$this->display('Article/article.html');
	}
	
}